﻿using DingTalk.Core.Models;
using Newtonsoft.Json;

namespace DingTalk.Corp.Message.Models
{
    /// <summary>
    /// 
    /// </summary>
    [JsonObject]
    public class MessageResultResponse : StandardResponse
    {
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("send_result")]
        public MessageSendResult SendResult
        {
            get;set;
        }
    }
    /// <summary>
    /// 
    /// </summary>
    [JsonObject]
    public class MessageSendResult
    {
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("invalid_user_id_list")]
        public string[] InvalidUsers { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("forbidden_user_id_list")]
        public string[] ForbiddenUsers { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("failed_user_id_list")]
        public string[] FailedUsers { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("read_user_id_list")]
        public string[] ReadUsers { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("unread_user_id_list")]
        public string[] UnreadUsers { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("invalid_dept_id_list")]
        public string[] InvalidDepts { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("forbidden_list")]
        public SendForbidden[] ForbiddenList { get; set; }
    }
    /// <summary>
    /// 
    /// </summary>
    [JsonObject]
    public class SendForbidden
    {
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("code")]
        public string Code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("count")]
        public int Count { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("userid")]
        public string UserID { get; set; }
    }
}
